﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using SelfMadeMillionaire.Core;
using SelfMadeMillionaire.Core.Entities;
using SelfMadeMillionaire.Core.Enums;
using SelfMadeMillionaire.Core.Repositories;
using SelfMadeMillionaire.Core.Services;
using SelfMadeMillionaire.Core.Specifications;

namespace SelfMadeMillionaire.BLL.Services
{
	public class SymbolOptionsHistoryService : ISymbolOptionsHistoryService
	{
		private readonly ISymbolOptionsHistoryRepository _symbolRepository;

        public SymbolOptionsHistoryService(ISymbolOptionsHistoryRepository symbolRepository)
		{
			_symbolRepository = symbolRepository;
		}

        public IEnumerable<SymbolOptionsHistory> GetAll()
        {
            return _symbolRepository.GetAll();
        }

        public SymbolOptionsHistory Add(SymbolOptionsHistory item)
		{
            return _symbolRepository.Add(item);
		}

        public IEnumerable<SymbolOptionsHistory> Search(bool isCalls, int daysInTrade, double minDiscount, string minAnnualReturnField, double minAnnualReturn, double minProbability, string symbols, string sortOrder)
        {
            return _symbolRepository.Search(isCalls, daysInTrade, minDiscount, minAnnualReturnField, minAnnualReturn, minProbability, symbols, sortOrder);
        }
       
	}
}